<template>
  <div>
    <h1>小头爸爸</h1>
    <big-header :money="money" :list="list"></big-header>
    <button @click="change">
      当传递给子元素的数据不要在子组件中更改，在父元素中改动
    </button>
  </div>
</template>

<script>
import BigHeader from "./BigHeader";
export default {
  name: "",
  props: [""],
  data() {
    return {
      money: "100w",
      list: [
        { name: "tom", age: 18 },
        { name: "jack", age: 10 },
        { name: "rose", age: 15 },
      ],
      /* 
        基本数据类型：string number null boolean undefined 
        引用数据类型：object array function 
      
      
      */
    };
  },

  components: {
    BigHeader,
  },

  computed: {},

  beforeMount() {},

  mounted() {},

  methods: {
    change() {
      this.money = "200W";
      console.log(this.list);
    },
  },

  watch: {},
};
</script>
<style lang='' scoped>
</style>